package info.macnana.online.oauth.service;

import info.macnana.online.core.base.ResponseResult;
import info.macnana.online.oauth.model.AccessToken;
import info.macnana.online.oauth.model.LoginPara;
import info.macnana.online.user.model.User;

/**
 * author: zhengheng
 * github: https://github.com/macnana777
 * email: 517862340@qq.com
 * <p>
 * Date: 2017-08-03 10:00
 * Description:
 * Copyright(©) 2017 by zhengheng.
 */
public interface AuthService {

    /**
     * 注册用户
     * @param user
     * @return
     */
    User register(User user);

    /**
     * 登录，获取当前用户token
     * @param username
     * @param password
     * @return
     */
    AccessToken login(String username, String password);
    /**
     * 刷新旧的token
     * @param oldToken
     * @return
     */
    AccessToken refresh(String oldToken);
}
